import React, { useState, useEffect } from 'react';
import {
  createBrowserRouter,
} from "react-router-dom";

import Home from "../views/home";
import List from "../views/list";
import Detail from "../views/detail";
import HospitalDetail from "../views/hospitalDetail";
import Application from "../views/application";



const router = createBrowserRouter([
  {
    path: "/",
    element: <Home />,
  },
  {
    path: "/list/:type",
    element: <List />
  },
  {
    path: "/detail/:type",
    element: <Detail />,
  },
  {
    path: "/hospitalDetail",
    element: <HospitalDetail />,
  },
  {
    path: "/application/:type",
    element: <Application />,
  },
]);

export default router